package simplefactory;

public class SimpleFactory {
    public static Product createProduct(String name){
        switch (name){
            case "A":
                return new ProductA();
            case "B":
                return new ProductB();
            default:
                return null;
        }
    }
}